case 'H': //healing (drug rehab, heal woulnds, cure std's)
if(expert==3) expert=1;
healing_ops();
if(expert==3) expert=1;
break;
case 'E':
if(expert==3) expert=1;
evil_ops(&cur_user);
if(expert==3) expert=1;
break;
case 'S': //street fights
if(expert==3) expert=1;
fight_ops(&cur_user);
if(expert==3) expert=1;
break;
case 'K': //suicide
ny_line(54,2,0);
key=ny_get_answer("YN");
if(!rip)
od_printf("%c\n\r",key);
else if(key=='Y') {
od_disp_str("\n\r!|10((*REALLY want to DIE?::y@Yes,n@No))|#|#|#\n\r");
key=od_get_answer("YN");
}
if (key=='Y')
Die(4);
else if(rip)
no_rip_m=1;
break;
case 'I':
if(registered==FALSE) {
ny_disp_emu("`%\n\r\n\rUNREGISTERED!!!\n\r\n\rCannot do this!!!\n\r");
WaitForEnter();
} else {
if(expert==3) expert=1;
change_info();
if(expert==3) expert=1;
}
break;
case '!': //instructions
od_printf("\n\r\n\r");
ny_clr_scr();
ch_game_d();
if(rip) od_send_file("FRAME.RIP");
if(rip) od_send_file("FRAME3.RIP");
if(clean_mode==TRUE)
ny_send_file("NYINSTRC.ASC");
else
ny_send_file("NYINSTR.ASC");
if(rip) od_send_file("FRAME1.RIP");
WaitForEnter();
break;
case 'C': // copfights
if(registered==FALSE) {
ny_disp_emu("`%\n\r\n\rUNREGISTERED!!!\n\r\n\rCannot do this!!!\n\r");
WaitForEnter();
} else {
if(expert==3) expert=1;
copfight_ops(&cur_user);
if(expert==3) expert=1;
}
break;
case 'P': // Player fights
if(expert==3) expert=1;
p_fight_ops(&cur_user,&nCurrentUserNumber);
if(expert==3) expert=1;
break;
case 'N': //newz
newz_ops();
break;
case 'X':
if(expert==3) expert=1;
if(rip) {
expert=0;
} else {
expert+=1;//expert;
if(expert>2) expert=0;
if (expert==2) { //expert
ny_line(55,2,1);
} else if(expert==1) { //regular
ny_line(56,2,1);
} else { //novice
ny_line(341,2,1);
}
WaitForEnter();
}
break;
case 'Q':
ny_line(57,2,0);
key=ny_get_answer("YN");
if(!rip)
od_printf("%c\n\r",key);
else
od_disp_str("\n\r");
if (key=='Y')
key='Q';
else if(!rip)
no_rip_m=1;
break;
case 'U': //use a-bomb to win game
//only if user got one
if (cur_user.arm!=A_BOMB) {
ny_line(58,2,1);
if(!rip)
WaitForEnter();
else {
od_get_answer("\n\r");
no_rip_m=1;
}
} else {
ny_line(59,2,0);
// od_printf("`bright red`\n\r\n\rR`red`eally do it? (`bright red`Y`red`/`bright red`N`red`)");
key=ny_get_answer("YN");
if(!rip)
od_printf("%c\n\r",key);
else
od_disp_str("\n\r");
if (key=='Y') {
cur_user.alive=DEAD;
wrt_sts();
od_printf("\n\r\n\r");
ny_clr_scr();
od_send_file("WIN");
ny_line(1,1,0);
od_get_answer("\n\r");
od_printf("\n\r\n\r");
ny_clr_scr();
ny_line(295,2,0);
// od_printf("\n\r\n\r`bright`YOU WON THE GAME!!!!! With
od_printf(D_Num(cur_user.points));
ny_line(296,0,2);
ny_send_menu(WIN,"");
/* od_printf("\n\r\n\r\n\r`white`Of course blowing up New York with an A-Bomb did wonders to your body\n\r");
od_printf("basically what I'm saying you died... but you completed yer mission ...\n\r");
od_printf("just think of all the people that died with you ...\n\r\n\r");*/
news_post("`%WON `4THE GAME .... `@LOOSERS ....",cur_user.name,"",3);
AddBestPlayer();
if(ibbs)
AddBestPlayerIB();
ny_line(1,1,0);
od_get_answer("\n\r");
od_exit(10,FALSE);
}
}
break;
}
} while (key!='Q');
}
char *D_Num(int num)
{
char temp[8];
int cnt,cnt2,len,sign=0;
if (num<0) {
sign=1;
str[0]='-';
}
sprintf(temp,"%d",num);
len=strlen(temp);
if (len<=4) {
strcpy(str,temp);
return str;
}
cnt2=sign;
for(cnt=sign;cnt<len-1;cnt++) {
str[cnt2]=temp[cnt];
if ( ( (int)((len-cnt-.00099)/3) *3) == (len-cnt-1) ) {
cnt2++;
str[cnt2]=',';
}
cnt2++;
}
str[cnt2]=temp[cnt];
str[cnt2+1]=0;
return str;
}
char *D_Num(long num)
{
char temp[15];
int cnt,cnt2,len,sign=0;
if (num<0) {
sign=1;
str[0]='-';
}
sprintf(temp,"%ld",num);
len=strlen(temp);
if (len<=4) {
strcpy(str,temp);
return str;
}
cnt2=sign;
for(cnt=sign;cnt<len-1;cnt++) {
str[cnt2]=temp[cnt];
if ( ((int)((len-cnt-.00099)/3)*3) == (len-cnt-1) ) {
cnt2++;
str[cnt2]=',';
}
cnt2++;
}
str[cnt2]=temp[cnt];
str[cnt2+1]=0;
return str;
}
char *D_Num(unsigned long num)
{
char temp[14];
int cnt,cnt2,len;
sprintf(temp,"%lu",num);
len=strlen(temp);
if (len<=4) {
strcpy(str,temp);
return str;
}
cnt2=0;
for(cnt=0;cnt<len-1;cnt++) {
str[cnt2]=temp[cnt];
if ( ((int)((len-cnt-.00099)/3)*3) == (len-cnt-1) ) {
cnt2++;
str[cnt2]=',';
}
cnt2++;
}
str[cnt2]=temp[cnt];
str[cnt2+1]=0;
return str;
}
void
points_raise(unsigned long raise)
{ // when is time for next level 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 //20
unsigned long level_seal[LEVELS] = {500,1020,2100,3700,6100,9100,12820,17300,22580,28700,35700,43620,52500,62380,73300,85300,98420,112700,128180,144900};//,162900};
char c_dir,key;
c_dir=c_dir_g;
cur_user.points+=raise * DrgPtsCoef();
if(cur_user.points>30000 && registered==FALSE) {
if(rip) {
scr_save();
ny_clr_scr();
od_send_file("FRAME.RIP");
od_send_file("FRAME1.RIP");
}
ny_disp_emu("`%\n\r\n\rUNREGISTERED!!!\n\r\n\r");
ny_disp_emu("You reached 30,000 points, and this game is `$UNREGISTERED`%!\n\r");
ny_disp_emu("This nag screen will appear to you every time your points raise\n\r");
ny_disp_emu("And you can't get into level 10, until the game is registered\n\r");
ny_disp_emu("Otherwise nothing will happen, please tell the sysop to register the game!\n\r");
WaitForEnter();
if(rip)
scr_res();
}
if(registered==FALSE && cur_user.level>9)
cur_user.level=9;
while (cur_user.level<20 && level_seal[cur_user.level]<=cur_user.points) {
if (cur_user.rest_where==MOTEL) od_printf("C`green`heap `bright green`M`green`otel");
else if (cur_user.rest_where==EXP_HOTEL) od_printf("E`green`xpensive `bright green`H`green`otel");
} else {
if (cur_user.rest_where==MOTEL) od_printf("Cheap Motel::@OK))|#|#|#");
else if (cur_user.rest_where==EXP_HOTEL) od_printf(" Expensive Hotel::@OK))|#|#|#\n\r");
}
ny_line(62,2,0);
//od_printf(" `bright red`W`red`anna check outta there (no money back)? (`bright red`Y`red`/`bright red`N`red`)");
s_key=ny_get_answer("YN");
od_putch(s_key);
if (s_key=='Y') goto Reg_hotel_ok;
if(rip) no_rip_m=1;
} else {
Reg_hotel_ok:;
intval=(cur_user.level*40)+40;
ny_line(297,2,0);
od_printf(D_Num(intval));
ny_line(298,0,0);
// od_printf("\n\r\n\r`bright red`I`red`t will cost ya `bright red`%d`red` per day.",intval);// still wanna do it(`bright red`Y`red`/`bright red`N`red`)",intval);
max=cur_user.money/intval;
if(rip)
od_get_answer("\n\r");
if (max>255) max=255;
ny_line(299,2,0);
od_printf(D_Num(max));
ny_line(300,0,2);
// od_printf("\n\r`bright red`Y`red`ou can afford `bright red`%s`red` days!\n\r",D_Num(max));
if(rip) {
od_get_answer("\n\r");
od_send_file("input.rip");
}
ny_line(301,0,0);
od_printf(D_Num(max));
ny_disp_emu("`2):");
//od_printf("`bright green`H`green`ow mady days ya wanna stay here? (`bright blue`Enter`green`=`bright green`[0]`green`, `bright blue`M`green`=max `bright green`%d`green`):",max);
if (cur_user.rest_where==MOTEL) od_printf("C`green`heap `bright green`M`green`otel");
else if (cur_user.rest_where==REG_HOTEL) od_printf("R`green`egular `bright green`H`green`otel");
} else {
if (cur_user.rest_where==MOTEL) od_printf("Cheap Motel::@OK))|#|#|#");
else if (cur_user.rest_where==REG_HOTEL) od_printf(" Regular Hotel::@OK))|#|#|#\n\r");
}
ny_line(62,2,0);
//od_printf(" `bright red`W`red`anna check outta there (no money back)? (`bright red`Y`red`/`bright red`N`red`)");
s_key=ny_get_answer("YN");
od_putch(s_key);
if (s_key=='Y') goto Exp_hotel_ok;
if(rip) no_rip_m=1;
} else {
Exp_hotel_ok:;
intval=(cur_user.level*110)+110;
ny_line(297,2,0);
od_printf(D_Num(intval));
ny_line(298,0,0);
//od_printf("\n\r\n\r`bright red`I`red`t will cost ya `bright red`%d`red` per day.",intval);// still wanna do it(`bright red`Y`red`/`bright red`N`red`)",intval);
max=cur_user.money/intval;
if(rip)
od_get_answer("\n\r");
if (max>255) max=255;
ny_line(299,2,0);
od_printf(D_Num(max));
ny_line(300,0,2);
if(rip) {
od_get_answer("\n\r");
//od_printf("\n\r`bright red`Y`red`ou can afford `bright red`%s`red` days!\n\r",D_Num(max));
od_send_file("input.rip");
}
ny_line(301,0,0);
od_printf(D_Num(max));
ny_disp_emu("`2):");
//od_printf("`bright green`H`green`ow mady days ya wanna stay here? (`bright blue`Enter`green`=`bright green`[0]`green`, `bright blue`M`green`=max `bright green`%d`green`):",max);